package com.kwm.Controller;

import com.kwm.Service.ClassService;
import com.kwm.entity.Clazz;
import com.kwm.entity.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
public class ClassController {


    @Autowired
    private ClassService classService;
    @GetMapping("/clazzs")
    public Result list(){
        List<Clazz> clazzes =  classService.list();
        return Result.success(clazzes);
    }
}
